#ifndef __RINGBUFFER_H
#define __RINGBUFFER_H	 
#include "sys.h"

#define ring_buff_size     256

typedef struct
{
    unsigned int pw;
    unsigned int pr;
    unsigned char data[ring_buff_size]; 
}ring_buff_t;

void ring_buff_init(ring_buff_t *ring_buffer);
void ring_buff_write(ring_buff_t *ring_buffer,unsigned char c);
int  ring_buff_read(ring_buff_t *ring_buffer,unsigned char *c);

#endif
